package joodle.ui;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import joodle.domain.Canvas;
import joodle.si.ResourceManager;
/**
 * Represents the "Group" action on the menu bar
 *
 */
@SuppressWarnings("serial")
public class GroupAction extends AbstractAction {
	public GroupAction() {
		putValue(Action.SMALL_ICON, ResourceManager.makeIcon("group"));
		putValue(Action.SHORT_DESCRIPTION, "Group");
	}
	/**
	 * @see AbstractAction#actionPerformed(ActionEvent)	
	 */
	@Override
	public void actionPerformed(ActionEvent e) {
		Canvas.instance().groupSelectedShapes();
		CanvasComponent.instance().repaint();
	}
}
